"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.dateMonth = exports.Time = exports.dateTime = exports.date = void 0;

var _moment = _interopRequireDefault(require("moment"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// 日期
var date = function date(value) {
  if (!value) {
    return '';
  }

  return (0, _moment.default)(new Date(Number(value))).format('YYYY/MM/DD');
}; // 时间


exports.date = date;

var dateTime = function dateTime(value) {
  if (!value) {
    return '';
  }

  return (0, _moment.default)(new Date(Number(value))).format('YYYY/MM/DD HH:mm:ss');
}; // 时间


exports.dateTime = dateTime;

var Time = function Time(value) {
  if (!value) {
    return '';
  }

  return (0, _moment.default)(new Date(Number(value))).format('HH:mm:ss');
}; // 月份


exports.Time = Time;

var dateMonth = function dateMonth(value) {
  if (!value) {
    return '';
  }

  return (0, _moment.default)(new Date(Number(value))).format('YYYY/MM');
};

exports.dateMonth = dateMonth;